<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Chapter&nbsp;14.&nbsp;商务日历</title>
    <link rel="stylesheet" href="css/html.css" type="text/css">
    <meta name="generator" content="DocBook XSL Stylesheets V1.65.1">
    <link rel="home" href="index.html" title="JBoss jBPM 3.1">
    <link rel="up" href="index.html" title="JBoss jBPM 3.1">
    <link rel="previous" href="asynchronouscontinuations.html" title="Chapter&nbsp;13.&nbsp;Asynchronous continuations">
    <link rel="next" href="logging.html" title="Chapter&nbsp;15.&nbsp;Logging">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="navheader">
    <table width="100%" summary="Navigation header">
        <tr>
            <th colspan="3" align="center">Chapter&nbsp;14.&nbsp;商务日历</th>
        </tr>
        <tr>
            <td width="20%" align="left"><a accesskey="p" href="asynchronouscontinuations.html">Prev</a>&nbsp;</td>
            <th width="60%" align="center">&nbsp;</th>
            <td width="20%" align="right">&nbsp;<a accesskey="n" href="logging.html">Next</a></td>
        </tr>
    </table>
    <hr>
</div>
<div class="chapter" lang="cn">
    <div class="titlepage">
        <div>
            <div><h2 class="title"><a name="businesscalendar"></a>Chapter&nbsp;14.&nbsp;商务日历</h2></div>
        </div>
        <div></div>
    </div>
    <p>This chapter describes the business calendar of jBPM. The business
        calendar knows about business hours and is used in calculation of due dates
        for tasks and timers.</p>

    <p>The business calendar is able to calculate a date by adding a duration
        and a date.
    </p>

    <div class="section" lang="cn">
        <div class="titlepage">
            <div>
                <div><h2 class="title" style="clear: both"><a name="duration"></a>14.1.&nbsp;期间（Duration）</h2></div>
            </div>
            <div></div>
        </div>
        <p>A duration is specified in absolute or in business hours.
            Let's look at the syntax:</p>

        <p><tt class="literal">&lt;quantity&gt; [business] &lt;unit&gt;</tt></p>

        <p>Where <tt class="literal">&lt;quantity&gt;</tt> is a piece of text that is parsable with
            Double.parseDouble(quantity).
            <tt class="literal">&lt;unit&gt;</tt> is one of {second, seconds, minute, minutes, hour, hours, day, days,
            week, weeks, month,
            months, year, years}. And adding the optional indication <tt class="literal">business</tt> means that only
            business hours should be taken
            into account for this duration. Without the indication <tt class="literal">business</tt>, the duration will
            be
            interpreted as an absolute time period.
        </p></div>
    <div class="section" lang="cn">
        <div class="titlepage">
            <div>
                <div><h2 class="title" style="clear: both"><a name="calendarconfiguration"></a>14.2.&nbsp;日历配置</h2></div>
            </div>
            <div></div>
        </div>
        <p>The file <tt class="literal">org/jbpm/calendar/jbpm.business.calendar.properties</tt> specifies what
            business hours are. The configuration file can be customized and a modified copy can be placed
            in the root of the classpath.</p>

        <p>This is the example business hour specification that is shipped by default
            in <tt class="literal">jbpm.business.calendar.properties</tt>: </p><pre class="programlisting">hour.format=HH:mm
#weekday ::= [&lt;daypart&gt; [&amp; &lt;daypart&gt;]*]
#daypart ::= &lt;start-hour&gt;-&lt;to-hour&gt;
#start-hour and to-hour must be in the hour.format
#dayparts have to be ordered
weekday.monday=    9:00-12:00 &amp; 12:30-17:00
weekday.thuesday=  9:00-12:00 &amp; 12:30-17:00
weekday.wednesday= 9:00-12:00 &amp; 12:30-17:00
weekday.thursday=  9:00-12:00 &amp; 12:30-17:00
weekday.friday=    9:00-12:00 &amp; 12:30-17:00
weekday.saturday=
weekday.sunday=

day.format=dd/MM/yyyy
# holiday syntax: &lt;holiday&gt;
# holiday period syntax: &lt;start-day&gt;-&lt;end-day&gt;
# below are the belgian official holidays
holiday.1=  01/01/2005 # nieuwjaar
holiday.2=  27/3/2005  # pasen 
holiday.3=  28/3/2005  # paasmaandag 
holiday.4=  1/5/2005   # feest van de arbeid
holiday.5=  5/5/2005   # hemelvaart 
holiday.6=  15/5/2005  # pinksteren 
holiday.7=  16/5/2005  # pinkstermaandag 
holiday.8=  21/7/2005  # my birthday 
holiday.9=  15/8/2005  # moederkesdag 
holiday.10= 1/11/2005  # allerheiligen 
holiday.11= 11/11/2005 # wapenstilstand 
holiday.12= 25/12/2005 # kerstmis 

business.day.expressed.in.hours=             8
business.week.expressed.in.hours=           40
business.month.expressed.in.business.days=  21
business.year.expressed.in.business.days=  220</pre>
    </div>
</div>
<div class="navfooter">
    <hr>
    <table width="100%" summary="Navigation footer">
        <tr>
            <td width="40%" align="left"><a accesskey="p" href="asynchronouscontinuations.html">Prev</a>&nbsp;</td>
            <td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td>
            <td width="40%" align="right">&nbsp;<a accesskey="n" href="logging.html">Next</a></td>
        </tr>
        <tr>
            <td width="40%" align="left" valign="top">Chapter&nbsp;13.&nbsp;Asynchronous continuations&nbsp;</td>
            <td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td>
            <td width="40%" align="right" valign="top">&nbsp;Chapter&nbsp;15.&nbsp;Logging</td>
        </tr>
    </table>
</div>
</body>
</html>